import { ref } from "vue";
import { getOrderGoodsDemo } from "@/api/cloud";
import { OrderGoods } from "@/types/index";

export default function useOrderGoodsDemo() {
  const goodsData = ref<OrderGoods[]>([]);

  getOrderGoodsDemo().then((res) => {
    const { data } = res;
    if (data.code === 200 && data.result) {
      goodsData.value = data.result;
    }
  });

  return { goodsData };
}
